//
//  Person.m
//  04-Foundation-NSArray
//
//  Created by Jason on 15/9/29.
//  Copyright © 2015年 Jason. All rights reserved.
//

#import "Person.h"

@implementation Person


- (NSString *)description
{
    return [NSString stringWithFormat:@"[age=%d]", _age];
}

- (void)study {
    
    NSLog(@"年龄为%d的人在学习",_age);
}

+ (Person *)personWithAge:(int)age {
    
    Person *person = [[[Person alloc] init] autorelease];
    person.age = age;
    
    return person;
}

- (void)dealloc {
    
    NSLog(@"年龄为%d的人被销毁了",_age);
    [super dealloc];
}


@end
